<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:jq="http://www.jquery4jsf.org/jsf"
	template="../templates/template-principale.xhtml">
	<ui:define name="title">
		<h:outputText value="#{resource.BUTTON_TITLE_ALERT}" />
	</ui:define>
	<ui:define name="content">
		<h3>
			Button - #{resource.BUTTON_TITLE_ALERT}
		</h3>
		<p>
			#{resource.BUTTON_DESCR_ALERT}
		</p>
		<jq:tabbedPanel>
			<jq:tabPanel tabName="Demo">
				<!-- START -->
				<h:form id="form1">
					<div>
						<jq:button id="button" value="Clicca qui"
							action="#{buttonBean.doButtonAction}">
							<jq:alertDialog title="Alert" closeOnEscape="false"
								position="center" draggable="false" resizable="false"
								autoOpen="false" id="alertDialog"
								onopen="jQuery('.ui-dialog-titlebar-close:eq(1)').hide();"
								dialogClass="ui-widget ui-state-error" modal="false">
								<jq:paragraph>
									<jq:icon type="alert" style="float: left; margin-right: 0.3em;" />
									<h:outputText value="Sei tifoso della A.S. Roma?" />
								</jq:paragraph>
								<h:commandButton action="#{buttonBean.doButtonAction}"
									value="Si" />
								<h:commandButton
									onclick="jQuery('#form1\\:alertDialog').dialog('close');return false;"
									value="No" />
							</jq:alertDialog>
						</jq:button>
						<br />
						<h:outputText value="#{buttonBean.text}" />
					</div>
				</h:form>
				<jq:ajaxStatus id="statusAjax">
					<f:facet name="start">
						<h:graphicImage value="/images/ajaxloading.gif"></h:graphicImage>
					</f:facet>
					<f:facet name="complete">
						<h:outputText value="Ajax Request complete"></h:outputText>
					</f:facet>
					<f:facet name="error">
						<h:outputText value="Ajax Request Error"></h:outputText>
					</f:facet>
				</jq:ajaxStatus>
				<!-- end -->
				<ui:include src="../templates/source.xhtml"></ui:include>
			</jq:tabPanel>
			<jq:tabPanel tabName="Tag Information">
				<ui:include src="../templates/taginformation.xhtml">
					<ui:param name="tagName" value="button"></ui:param>
					<ui:param name="tagDefinition"
						value="#{startupBean.tagLib.tags['button']}"></ui:param>
				</ui:include>
			</jq:tabPanel>
		</jq:tabbedPanel>
	</ui:define>
</ui:composition>